Initial skeleton for case split in elisp

This commit is contained in:
Alejandro Serrano
2014-06-17 18:15:36 +02:00
parent 8a63ae078b
commit 5a968225c3
4 changed files with 51 additions and 1 deletions

View File

@@ -388,6 +388,11 @@ initialBodyArgs (FnArgFunction:xs) vs (f:fs) = f : initialBodyArgs xs vs fs
initialBodyArgs (FnArgNormal:xs) (v:vs) fs = v : initialBodyArgs xs vs fs
initialBodyArgs _ _ _ = error "This should never happen" -- Lists are infinite
-- Getting the initial body of function and instances differ
-- This is because for functions we only use the parsed file
-- (so the full file doesn't have to be type correct)
-- but for instances we need to get information about the class
initialFnBody :: DynFlags -> PprStyle -> G.HsType G.RdrName -> G.RdrName -> String
initialFnBody dflag style ty name =
let fname = showOccName dflag style $ occName name -- get function name