-
-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
I have this code:
{-# LANGUAGE TypeData #-}
infixr :->
type data PCFType = PCFType :-> PCFType | Nat
And Stan reports:
✲ Name: Data types with non-strict fields
✲ Description: Defining lazy fields in data types can lead to unexpected space leaks
✲ Severity: Performance
✲ Category: #SpaceLeak #Syntax
Possible solutions:
- Add '!' before the type, e.g. !Int or !(Maybe Bool)
- Enable the 'StrictData' extension: {-# LANGUAGE StrictData #-}
stan(STAN-0206)
But strictness fields are not allowed in type data
declarations.
Metadata
Metadata
Assignees
Labels
No labels