From 1743b14a5459dd5a64704527eb5ac3cd27b23c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20H=C3=B6glund?= Date: Tue, 6 May 2014 22:39:51 +0200 Subject: [PATCH] Update TypeErrors.md --- src/TypeErrors.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/TypeErrors.md b/src/TypeErrors.md index 75e96b8..c7216fd 100644 --- a/src/TypeErrors.md +++ b/src/TypeErrors.md @@ -21,11 +21,9 @@ Utility functions `asScore` etc The `lens` library is famously huge. The concepts you need to use Music Suite are `Lens`, `Prism`, `Iso` and `Traversal`. -If you get an error on the form +The most common error in code that uses lenses is mixing up a lenses with functions, i.e. writing `duration` when you mean `view duration`. This will give you an error that looks something like this: - Couldn't match expected type `Time' with actual type `a0 -> f0 a0' - -you probably mixed up a lens or getter with an acessor (i.e. `duration` vs `view duration`). + Couldn't match expected type `Duration' with actual type `a0 -> f0 a0' ### Get an intuition for what the classes and type functions do